<extend name="Public:publicHTML"/>

<block name="nav">

	<div class="nav">
	    <div class="nav_title">
	        <h4><img class="nav_img" src="__PUBLIC__/Admin/img/tab.gif" /> <a  class="nav_a" url="{:U('addConfig')}" >添加配置分类</a></h4>
	    </div>
		    <if condition=" $_SESSION['aid'] eq 1">
		        <div class="nav_button">
		            <a  class="a_button" onclick="system.edit_or_add(this.getAttribute('url'))" url="{:U('addConfig', '添加分类设置内容')}">添加</a>
		        </div>
		    </if>
	</div>

</block>
<block name="content">
	<div class="list">
	    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
	        <thead>
	        <tr>
	            <td width="15%"><div align="center">配置编号</div></td>
	            <td width="20%"><div align="center">分类名称</div></td>
	            <td width="15%"><div align="center">添加时间</div></td>
				<td width="15%"><div align="center">更新时间</div></td>
	            <td width="12%"><div align="center">操作</div></td>
	        </tr>
	        </thead>
	        <tbody class="dataHTML">
	        </tbody>
	         	<foreach name="data" item="vo">
				    <tr>
				      <td height="42"><div align="center">{$vo.id}</div></td>
				      <td><div style="padding-left:50px;">{$vo.config_class_name}</div>
			          </td>
				      <td><div align="center">{$vo.create_time|date="Y-m-d H:i:s",###}</div></td>
				      <td><div align="center">{$vo.update_time|date="Y-m-d H:i:s",###}</div></td>
					  <td align="center">
					  	<a href="javascript:;" onclick="hot_words.edit_or_add('{:U('editConfig', array('id'=> $vo['id']))}')">编辑</a>
					  	<a href="javascript:;" onclick="hot_words.deleteConfigClass({$vo.id}, '{:U('delConfig')}', '{:U('isHaveClass')}')">删除</a>
					  </td>
				    </tr>
		          	  <foreach name="vo['children']" item="sub">
		                  <tr>
		                      <td height="40"><div align="center">{$sub.id}</div></td>
		                      <td><div style="padding-left:50px;">&nbsp;&nbsp;&nbsp;&nbsp;┠─&nbsp;&nbsp;{$sub.config_class_name}</div></td>
		                      <td><div align="center">{$sub.create_time|date="Y-m-d H:i:s",###}</div></td>
		                      <td><div align="center">{$vo.update_time|date="Y-m-d H:i:s",###}</div></td>
		                      <td align="center">
			                      <a href="javascript:;" onclick="hot_words.edit_or_add('{:U('editConfig', array('id'=> $sub['id']))}')">编辑</a>
			                      <a href="javascript:;" onclick="hot_words.deleteConfigClass({$sub.id}, '{:U('delConfig')}', '{:U('isHaveClass')}')">删除</a>
		                      </td>
		                  </tr>
		              </foreach>
		        </foreach>
		     </tbody>
		</table>
</div>

<!-- 分页 -->
<div class="page">
  <div align="center">{$page} </div>
</div>
	
<script type="text/javascript" src="__PUBLIC__/Admin/js/goods/hot_words.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/system/system.js?a=123"></script>
<script>/*hot_words.tree("{:U('index')}", 'jklj')*/</script>
</block>